package com.mud.dnd.domain.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

import org.codehaus.jackson.annotate.JsonIgnore;


@Entity
public class Comment extends DnDItem implements Serializable {
	
	private GameItem gameItem;
	private String message;
	private Date creationDate;
	private int gameItemID;
	
	
	
	
	public Comment() {
		super();
	}





	public Comment(String message, Date creationDate, User author, GameItem item) {
		super();
		this.message = message;
		this.creationDate = creationDate;
		this.author = author;
		gameItem = item;
	}



	
	
	
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}





	public Date getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	

	@JsonIgnore
	@ManyToOne
	public GameItem getGameItem() {
		return gameItem;
	}



	public void setGameItem(GameItem gameItem) {
		this.gameItem = gameItem;
	}




	@Transient
	public int getGameItemID() {
		return gameItemID;
	}





	public void setGameItemID(int gameItemID) {
		this.gameItemID = gameItemID;
	}
	
	
	
	

}
